/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.vod.net;

import java.net.DatagramPacket;
import java.net.InetAddress;

/**
 *
 * @author dRazanakoto
 */
public abstract class Receiver {

    protected InetAddress ip;
    protected int port;

    /**
     *
     */
    public Receiver(InetAddress ip, int port) {
        this.ip = ip;
        this.port = port;
    }

    /**
     *
     * @return
     */
    public abstract String receive() throws Exception;

    /**
     * 
     * @param heartbeatSleep
     * @return
     * @throws Exception
     */
	public abstract DatagramPacket receive(int heartbeatSleep) throws Exception;
	
	/**
	 * 
	 * @param timeOut
	 * @return
	 */
	public abstract String receiveTimeOut(int timeOut);
}
